<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="http://www.baidu.com" id="a1">点击我</a>
</body>
<script>
    a = document.getElementById('a1')
    a.href = "javascript:void(0)"

</script>
</html>
